# Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=py3-prettytable
_pkgname=prettytable
pkgver=0.7.2
pkgrel=11
pkgdesc="Python library for easily displaying tabular data"
url="https://github.com/jazzband/prettytable"
arch="noarch"
license="BSD-3-Clause"
depends="python3 !py3-prettytable3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/P/PrettyTable/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces=py-prettytable # Backwards compatibility
provides=py-prettytable=$pkgver-r$pkgrel # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
	chmod a+rX "$pkgdir"/usr/lib/python3*/site-packages/*.egg-info/*
}

sha512sums="
84611b9ad11bd428cdb00795e0a9baff44d027331b73ed1742596acda8acc8aca3df4276fa2f2ca2289f10b2989b3c86556de70bca6a9773b15cd80c54c33117  prettytable-0.7.2.tar.gz
"
